package pack0625;

public class Person {//定义的属性
    public String name;
    public String address="北京";
    public Person(){
    }
//构造函数  初始化
    public Person(String name) {
        this.name = name;
    }
    protected  Person sing(int n) {
        return new Person("");
    }
//有参，无参构建函数
    public void sing() {
        System.out.println(name + "在唱歌");
    }
    public  void  sing(String name){
        System.out.println(this.name+"在"+address+"唱歌"+name+"歌曲");
    }
    public  void  sing(String  name,int b){
        System.out.println(this.name+"在"+address+"唱歌"+name+"歌曲，唱了"+b+"遍");
    }

}
